/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.ieslaferreria.creditsintesis.logicgame;

import com.jme.scene.Point;

/**
 *Este tipo de objeto es capaz de tener estados, El mejor ejemplo es el de una puerta,capaz de estar abierta o
 * cerrada.
 * Para Documentar Carlos
 * @author Administrador
 */
public class LogicObjectWithStates{

    /* JC: I'm not sure this attribute is necessary. Position is mantained by
     *     logic part or by graphyc part?
     *     Maybe it is necessary as position in the world, but I think this will be a vector.
     *     In JME a point is not a geometryc point. I understand it as something complex.
     */
    public Point position;
    StateMachine state;
    
    public void ObjectWithStates(Point p,StateMachine stateKind){
    this.position=p;
    this.state = stateKind;

    }
   
    public void processTransition(int pActivator){
    this.state.setState(pActivator);
      }
    public int getToDo(){
        return this.state.getState();
    }
   public Point getPosition(){
      return this.position;
    }
    public void setPosition(Point p){
        this.position=p;
    }


}
